﻿Imports System
Imports System.Collections

Public Class RepositorioBE
#Region "Campos y Propiedades"
    Private _IdRepositorio As Integer
    Private _Nombre As String
    Private _RutaInicio As String
    Private _ConnectionString As String
    Private _RutaDocumentos As String
    Private _TipoBD As String
    Private _Online As Boolean

    Public Property IdRepositorio() As Integer
        Get
            Return _IdRepositorio
        End Get
        Set(ByVal value As Integer)
            _IdRepositorio = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property

    Public Property RutaInicio() As String
        Get
            Return _RutaInicio
        End Get
        Set(ByVal value As String)
            _RutaInicio = value
        End Set
    End Property

    Public Property ConnectionString() As String
        Get
            Return _ConnectionString
        End Get
        Set(ByVal value As String)
            _ConnectionString = value
        End Set
    End Property

    Public Property RutaDocumentos() As String
        Get
            Return _RutaDocumentos
        End Get
        Set(ByVal value As String)
            _RutaDocumentos = value
        End Set
    End Property

    Public Property TipoBD() As String
        Get
            Return _TipoBD
        End Get
        Set(ByVal value As String)
            _TipoBD = value
        End Set
    End Property

    Public Property Online() As Boolean
        Get
            Return _Online
        End Get
        Set(ByVal value As Boolean)
            _Online = value
        End Set
    End Property


#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdRepositorio As Integer, ByVal Nombre As String, ByVal RutaInicio As String, ByVal ConnectionString As String, ByVal RutaDocumentos As String, ByVal TipoBD As String, ByVal Online As Boolean)
        Me._IdRepositorio = IdRepositorio
        Me._Nombre = Nombre
        Me._RutaInicio = RutaInicio
        Me._ConnectionString = ConnectionString
        Me._RutaDocumentos = RutaDocumentos
        Me._TipoBD = TipoBD
        Me._Online = Online
    End Sub
#End Region
End Class

Public Class RepositorioBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As RepositorioBE
        Get
            Return CType(List(index), RepositorioBE)
        End Get
        Set(ByVal value As RepositorioBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As RepositorioBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As RepositorioBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As RepositorioBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As RepositorioBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As RepositorioBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class



